package com.aaa.charge.api.CareHistory;

import com.aaa.charge.feign.DateFegin;
import com.aaa.charge.service.CareHistoryService;
import com.aaa.charge.service.CareTuiService;
import com.aaa.charge.vo.PostObjectVo;
import com.aaa.entity.DictData;
import com.aaa.vo.Result;
import org.springframework.web.bind.annotation.*;

import javax.annotation.Resource;
import java.util.List;
import java.util.Map;

/**
 * @author pzs
 * @date 2023/3/30 18:48
 * @description ApiCareTui
 */
@RestController
@RequestMapping("charge/api/careTui")
public class ApiCareTui {
    @Resource
    private CareTuiService careTuiService;

    /**
     * 处方退费
     * 查询病列 处方
     */

    @GetMapping("getBackfeeRegId/{regId}")
    public Result<Map<String,Object>> findcareHistory(@PathVariable String regId){
        return careTuiService.findcareHistory(regId);
    }

    //现金
    @PostMapping("payObj")
    public Result payObj(@RequestBody PostObjectVo postObjectVo){
        return careTuiService.updateStatus(postObjectVo);
    }
    //微信
    @PostMapping("payZfb")
    public Result payZfb(@RequestBody PostObjectVo postObjectVo){
        return careTuiService.updateSta(postObjectVo);
    }

}
